package com.mtsmda.java8Ex;

public class DefaultMethodsInTheInterface {
	
	public static void main(String[] args) {
		
		Formula formula = new Formula() {
			
			@Override
			public void calculate(double d) {
				System.out.println(sqrt(d));
			}
		};
		
		formula.calculate(9);
	}
	
}

interface Formula {
	
	public void calculate(double d);
	
	default double sqrt(double d){
		return Math.sqrt(d);
	}
}